package cn.schoolwow.util.test.module.query.resource.testcase;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.util.domain.query.resource.QueryResource;
import com.alibaba.fastjson.JSONArray;
import org.junit.Assert;

public class CheckExistTestCaseFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        JSONArray array = QueryResource.newQuery("不存在的资源", "module/notExist.json")
                .checkExist(false)
                .execute()
                .getAsJSONArray();
        Assert.assertNull(array);
    }

    @Override
    public String name() {
        return "检查不存在资源测试用例";
    }
}
